<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="${ctx }/style/css_member.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx }/js/common.js"></script>
<script src="../js/artDialog.js?skin=gray"></script>
<script type="text/javascript" src="${ctx }/js/jquery-1.3.2.js"></script>
<script language="javascript" type="text/javascript" src="${ctx }/js/My97DatePicker/WdatePicker.js"></script>
<style type="text/css">
	.testtab{ margin:0 auto; width: 890px;}
	.tabtag{ line-height:30px; height:30px;background-image:url("../images/tab_line.jpg");background-repeat: repeat-x;zoom: 1;border: 1px solid #ccc;}
	.tabtag li{ float:left; width:10%; text-align:center; font-family: 宋体;font-size: 14px;border-right: solid #DDD 1px;cursor: pointer;}
	.tabtag li.cur{ background:#ffffff;border-bottom:1px solid #ffffff;_display:inline;font-weight: bold;font-size: 14px;}
	.tabcon div{font-size: 12px;font-family: 宋体；}
	
	.cur_img_1{width: 76px;height: 90px;float:left;margin-right:15px;border:1px solid #ccc;cursor: pointer}
</style>

<title>领取拍品(拍卖列表)</title>

<script type="text/javascript">

function showTabs(n) {
	  var tabsNumber = 4;
	  for (i = 0; i < tabsNumber; i++) {
	      if (i == n) {
	          $("#tabPanel-" + i).show();
	          $("#tab_li_"+i).addClass("cur");
	      } else {
	          $("#tabPanel-"+ i).hide();
	          $("#tab_li_"+i).removeClass("cur");
	      }
	  }
}

function search(){

	var actionUrl = "${ctx }/bid/promotionAction!fetch.do";

	$("#curPage").val(1);
	$("#searchForm").attr("action",actionUrl);
	$("#searchForm").submit();
}

function gotoPage(formid,curpage,flag){

	var formObj = document.getElementById(formid);

	var actionUrl = formObj.action;

	if(flag > 0 ){
		curpage = curpage + 1;	
	}else{
		curpage = curpage - 1;	
	}
	actionUrl +="&curPage="+curpage;

	formObj.submit();
}

function copy_linkurl(){

	var txt = $("#linkurl_bid").val();
	copyToClipboard(txt);
}

/*** 链接地址推广 ***/
function promotion_link(uid){

	var current_href = window.location.href;

	var index = current_href.indexOf("?");
	if(index > 0 ){
		current_href +="&uid="+uid;
	}else{
		current_href +="?uid="+uid;
	}
	$("#linkurl_bid").val(current_href);

	art.dialog({
		content:document.getElementById("linkurl_promotion_Div")
		});
}

$(function(){
	showTabs(0);
});

</script>

</head>

<body>

<!-- 页面头部  -->
<jsp:include page="/commons/head_member.jsp"></jsp:include>

<div id="main">
		<table width="910" border="0" cellspacing="0" cellpadding="0" align="center">
			<tr><td>
				<table width="100%" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td class="nw12a" width="60" align="right">
							拍品主题：</td><td><input name="filterTxt" value="title" type="hidden"/>
							<input name="filterValue" type="text" size="15" value="${filterValue }"/>
							<img src="../images/an25.gif" width="50" height="21" onclick="return search()" style="cursor: pointer;vertical-align: bottom;" >
						</td>
					</tr>
					<tr>
						<td class="nw12a"  align="right">开始时间：</td>
						<td>
							<input name="startDate" type="text" size="15" onClick="WdatePicker()" value="<fmt:formatDate value='${startDate }' pattern='yyyy-MM-dd'/>">&nbsp;&nbsp;
			              	结束时间：<input name="endDate" type="text" size="15" onClick="WdatePicker()"  value="<fmt:formatDate value='${endDate }' pattern='yyyy-MM-dd'/>">&nbsp;&nbsp;
							<img src="../images/an25.gif" width="50" height="21" onclick="return search()" style="cursor: pointer;vertical-align: bottom;" >
						</td>
					</tr>
				</table>
			</td></tr>
		 <tr><td colspan="100%">
				<div class="testtab" id="testtab">
				    	<div id="tabtag" class="tabtag" style="position:relative;">
				        	<ul style="padding: 0px;margin: 0px;">
				            	<li onclick="showTabs(0)" id="tab_li_0">最新上拍</li>
				                <li onclick="showTabs(1)" id="tab_li_1">热拍作品</li>
				                <li onclick="showTabs(2)" id="tab_li_2">油画</li>
				                <li onclick="showTabs(3)" id="tab_li_3">国画</li>
				            </ul>
				        </div>
				        <div id="tabcon" class="tabcon">
				        	<div id="tabPanel-0">
				        		<form action="${ctx }/bid/promotionAction!fetch.do?flag=1" id="form1" name="form1" method="post">
						        	<c:forEach items="${requestScope.list1}" var="bid" varStatus="status">
						        		<div style="border-bottom: 1px solid #ccc;border-left: 1px solid #ccc;border-right:1px solid #ccc; ">
						        			<div style="float: left;width: 315px;margin:10px 0px 10px 0px;">
							        			<div class="cur_img_1" style="float: left;margin-left: 20px;"><div style="margin-top:8px;margin-left:8px;width: 60px;height: 74px;background-position: center center;background-image: url(${bid.goods.painting.smallImagePath});"></div></div>
							        			<div style="float: left;">
							        				<ul style="padding: 0;margin: 0">
							        					<li style="line-height: 20px;">拍品：${bid.title }</li>
							        					<li style="line-height: 20px;">上拍时间：<fmt:formatDate value='${bid.uploadTime }' pattern='yyyy-MM-dd HH:mm'/></li>
							        					<li style="line-height: 20px;">底价：<fmt:formatNumber value="${bid.beginPrice }" type="number" pattern="#.##"/>元</li>
							        					<li style="line-height: 20px;">剩余时间：</li>
							        				</ul>
							        			</div>
							        		</div>
							        		<div style="width:570px;float: left;border-left: 1px solid #ccc;height: 110px;text-align: center;">
							        			<span style="line-height: 90px;vertical-align: middle;">
								        			<a href="">微博推广</a>
								        			<a href="javascript:promotion_link(${sessionScope.userinfo.id })">嵌入代码</a>
								        			<a href="javascript:promotion_link(${sessionScope.userinfo.id })">复制转贴</a>
								        			<a href="javascript:promotion_link(${sessionScope.userinfo.id })">地址推广</a>
							        			</span>
							        		</div>
							        		<div style="clear: both;"></div>
						        		</div>
						        	</c:forEach>
						        	<div style="font-size: 12px;text-align: right;padding: 10px 20px 10px 0px;">
							        	 <c:if test="${requestScope.curPage1 > 1}"><a href="javascript:gotoPage('form1',${requestScope.curPage1 },-1)">上一页</a></c:if>
							        		当前第${requestScope.curPage1 }页/共${requestScope.pageCount1 }页
							        	 <c:if test="${requestScope.curPage1 < requestScope.pageCount1}"><a href="javascript:gotoPage('form1',${requestScope.curPage1 },1)">下一页</a></c:if>
						        	</div>
						        </form>
				            </div>
				        	<div id="tabPanel-1">
				        		<form action="${ctx }/bid/promotionAction!fetch.do?flag=2" id="form2" name="form2" method="post">
						        	<c:forEach items="${requestScope.list2}" var="bid" varStatus="status">
						        		<div style="border-bottom: 1px solid #ccc;border-left: 1px solid #ccc;border-right:1px solid #ccc; ">
						        			<div style="float: left;width: 315px;margin:10px 0px 10px 0px;">
							        			<div class="cur_img_1" style="float: left;margin-left: 20px;"><div style="margin-top:8px;margin-left:8px;width: 60px;height: 74px;background-position: center center;background-image: url(${bid.goods.painting.smallImagePath});"></div></div>
							        			<div style="float: left;">
							        				<ul style="padding: 0;margin: 0">
							        					<li style="line-height: 20px;">拍品：${bid.title }</li>
							        					<li style="line-height: 20px;">上拍时间：<fmt:formatDate value='${bid.uploadTime }' pattern='yyyy-MM-dd HH:mm'/></li>
							        					<li style="line-height: 20px;">底价：<fmt:formatNumber value="${bid.beginPrice }" type="number" pattern="#.##"/>元</li>
							        					<li style="line-height: 20px;">剩余时间：</li>
							        				</ul>
							        			</div>
							        		</div>
							        		<div style="width:570px;float: left;border-left: 1px solid #ccc;height: 110px;text-align: center;">
							        			<span style="line-height: 90px;vertical-align: middle;">
								        			<a href="">微博推广</a>
								        			<a href="javascript:promotion_link(${sessionScope.userinfo.id })">嵌入代码</a>
								        			<a href="javascript:promotion_link(${sessionScope.userinfo.id })">复制转贴</a>
								        			<a href="javascript:promotion_link(${sessionScope.userinfo.id })">地址推广</a>
							        			</span>
							        		</div>
							        		<div style="clear: both;"></div>
						        		</div>
						        	</c:forEach>
						        	<div style="font-size: 12px;text-align: right;padding: 10px 20px 10px 0px;">
							        	 <c:if test="${requestScope.curPage2 > 1}"><a href="javascript:gotoPage('form2',${requestScope.curPage2 },-1)">上一页</a></c:if>
							        		当前第${requestScope.curPage2 }页/共${requestScope.pageCount2 }页
							        	 <c:if test="${requestScope.curPage2 < requestScope.pageCount2}"><a href="javascript:gotoPage('form2',${requestScope.curPage2 },1)">下一页</a></c:if>
						        	</div>
						        </form>
				            </div>
				        	<div id="tabPanel-2">
				        		<form action="${ctx }/bid/promotionAction!fetch.do?flag=3" id="form3" name="form3" method="post">
						        	<c:forEach items="${requestScope.list3}" var="bid" varStatus="status">
						        		<div style="border-bottom: 1px solid #ccc;border-left: 1px solid #ccc;border-right:1px solid #ccc; ">
						        			<div style="float: left;width: 315px;margin:10px 0px 10px 0px;">
							        			<div class="cur_img_1" style="float: left;margin-left: 20px;"><div style="margin-top:8px;margin-left:8px;width: 60px;height: 74px;background-position: center center;background-image: url(${bid.goods.painting.smallImagePath});"></div></div>
							        			<div style="float: left;">
							        				<ul style="padding: 0;margin: 0">
							        					<li style="line-height: 20px;">拍品：${bid.title }</li>
							        					<li style="line-height: 20px;">上拍时间：<fmt:formatDate value='${bid.uploadTime }' pattern='yyyy-MM-dd HH:mm'/></li>
							        					<li style="line-height: 20px;">底价：<fmt:formatNumber value="${bid.beginPrice }" type="number" pattern="#.##"/>元</li>
							        					<li style="line-height: 20px;">剩余时间：</li>
							        				</ul>
							        			</div>
							        		</div>
							        		<div style="width:570px;float: left;border-left: 1px solid #ccc;height: 110px;text-align: center;">
							        			<span style="line-height: 90px;vertical-align: middle;">
								        			<a href="">微博推广</a>
								        			<a href="javascript:promotion_link(${sessionScope.userinfo.id })">嵌入代码</a>
								        			<a href="javascript:promotion_link(${sessionScope.userinfo.id })">复制转贴</a>
								        			<a href="javascript:promotion_link(${sessionScope.userinfo.id })">地址推广</a>
							        			</span>
							        		</div>
							        		<div style="clear: both;"></div>
						        		</div>
						        	</c:forEach>
						        	<div style="font-size: 12px;text-align: right;padding: 10px 20px 10px 0px;">
							        	 <c:if test="${requestScope.curPage3 > 1}"><a href="javascript:gotoPage('form3',${requestScope.curPage3 },-1)">上一页</a></c:if>
							        		当前第${requestScope.curPage3 }页/共${requestScope.pageCount3 }页
							        	 <c:if test="${requestScope.curPage3 < requestScope.pageCount3}"><a href="javascript:gotoPage('form3',${requestScope.curPage3 },1)">下一页</a></c:if>
						        	</div>
						        </form>
				            </div>
				            <div id="tabPanel-3">
				               <form action="${ctx }/bid/promotionAction!fetch.do?flag=4" id="form4" name="form4" method="post">
						        	<c:forEach items="${requestScope.list4}" var="bid" varStatus="status">
						        		<div style="border-bottom: 1px solid #ccc;border-left: 1px solid #ccc;border-right:1px solid #ccc; ">
						        			<div style="float: left;width: 315px;margin:10px 0px 10px 0px;">
							        			<div class="cur_img_1" style="float: left;margin-left: 20px;"><div style="margin-top:8px;margin-left:8px;width: 60px;height: 74px;background-position: center center;background-image: url(${bid.goods.painting.smallImagePath});"></div></div>
							        			<div style="float: left;">
							        				<ul style="padding: 0;margin: 0">
							        					<li style="line-height: 20px;">拍品：${bid.title }</li>
							        					<li style="line-height: 20px;">上拍时间：<fmt:formatDate value='${bid.uploadTime }' pattern='yyyy-MM-dd HH:mm'/></li>
							        					<li style="line-height: 20px;">底价：<fmt:formatNumber value="${bid.beginPrice }" type="number" pattern="#.##"/>元</li>
							        					<li style="line-height: 20px;">剩余时间：</li>
							        				</ul>
							        			</div>
							        		</div>
							        		<div style="width:570px;float: left;border-left: 1px solid #ccc;height: 110px;text-align: center;">
							        			<span style="line-height: 90px;vertical-align: middle;">
								        			<a href="">微博推广</a>
								        			<a href="javascript:promotion_link(${sessionScope.userinfo.id })">嵌入代码</a>
								        			<a href="javascript:promotion_link(${sessionScope.userinfo.id })">复制转贴</a>
								        			<a href="javascript:promotion_link(${sessionScope.userinfo.id })">地址推广</a>
							        			</span>
							        		</div>
							        		<div style="clear: both;"></div>
						        		</div>
						        	</c:forEach>
						        	<div style="font-size: 12px;text-align: right;padding: 10px 20px 10px 0px;">
							        	 <c:if test="${requestScope.curPage4 > 1}"><a href="javascript:gotoPage('form4',${requestScope.curPage4 },-1)">上一页</a></c:if>
							        		当前第${requestScope.curPage4 }页/共${requestScope.pageCount4 }页
							        	 <c:if test="${requestScope.curPage4 < requestScope.pageCount4}"><a href="javascript:gotoPage('form4',${requestScope.curPage4 },1)">下一页</a></c:if>
						        	</div>
						       </form>
				            </div>
				        </div>
		 		</div>
		</td></tr>
	</table>
</div>

<div id="linkurl_promotion_Div" style="display: none;padding: 10px 0px 10px 0px;">
	<input type="text" id="linkurl_bid" name="linkurl_bid" size="80"/>&nbsp;&nbsp;
	<input type="button" value="复制" name="copy_button" id="copy_button" onclick="copy_linkurl()" style="padding: 5px;"/>
</div>
    
<jsp:include page="/commons/foot_member.jsp"></jsp:include>

</body>
</html>